package com.boot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class IndexController {

    @RequestMapping("/index")
    public String index(){

        int i = 10 / 0;
        String[] arr = {"1"};
        System.out.println(arr[5]);//数组越界异常

        return "index";
    }

    @RequestMapping("/index2")
    public String index2(){
        return "index2";
    }

}
